package main

import (
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

type User2 struct {
	Name string
}

func (u User2) TableName() string {
	return "aa_bb2"
}

func main() {
	dsn := "root:hedaodao@(127.0.0.1:3306)/gorm_class?charset=utf8mb4&parseTime=True&loc=Local"
	DB, _ := gorm.Open(mysql.Open(dsn), &gorm.Config{})
	DB.AutoMigrate(&User2{})

}
